import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
const module = '/product/brand'


export function listAllBrandByC3id(c3id) {
  return request({
    url: module+"/list/"+c3id,
    method: 'get'

  })
}


export function listAllBrand() {
  return request({
    url: module,
    method: 'get',

  })
}

// 查询单位列表
export function listBrand(query) {
  return request({
    url: module+'/'+'list',
    method: 'get',
    params: query
  })
}

// 查询单位详细
export function getBrand(brandId) {
  return request({
    url: module +'/'+ parseStrEmpty(brandId),
    method: 'get'
  })
}

// 新增单位
export function addBrand(data) {
  return request({
    url: module,
    method: 'post',
    data: data
  })
}

// 修改单位
export function updateBrand(data) {
  return request({
    url: module,
    method: 'put',
    data: data
  })
}

// 删除单位
export function delBrand(brandId) {
  return request({
    url: module +'/'+ brandId,
    method: 'delete'
  })

}
